package com.shell.guard.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import com.shell.guard.service.LoginInfoService;

@Service
public class LoginInfoServiceImpl implements LoginInfoService {
	@Autowired
	private JdbcTemplate jdbcTemplate;

	public String queryClientSecret(String clientId) {
		String sql = "select client_secret from oauth_client_details where client_id = ?";
		String res = (String) this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { clientId });
		return res;
	}
}
